home *** CD-ROM | disk | FTP | other *** search
- /* sendmail.rexx ... script to fudge "sendmail" for DNET, */
- /* Version 1.03, by Rick Taylor, 7-20-94 */
- /* Version 3.00 - Just uses different names for */
- /* GRn/AmigaElm/Send_Mail */
-
-
- /* Thanks to Joe Rumsey for suggesting using 'putfiles' */
-
- /* GRn's */
-
- MailFile = ARG(1)
- options results
- lf = '0a'x
- cr = '0d'x
- address command
-
- /* If the proper dshrexx isn't running, start it. Else go on */
- /* We want to make sure there's some way to get commands to */
- /* the UNIX side */
-
- portok = show('p','GRNDNETMAIL.01')
- if portok = 0 then 'run <nil: >nil: dnet:dshrexx 8195 0 GRNDNETMAIL'
- waitforport GRNDNETMAIL.01
- waitforport GRNDNETMAIL.01
-
- /* Copy the mail file */
-
- 'copy' Mailfile "t:grnrsm.mail QUIET"
-
- /* Put the file in your unix directory */
-
- 'dnet:putfiles <NIL: >NIL: t:grnrsm.mail'
-
- /* Tell UNIX to send it now ... then delete the temp file on UNIX */
-
- address 'GRNDNETMAIL.01'
- rxinit
- "raw"
- "send stty -echo" lf
- getln
-
- /* NOTE: Check this path to see if it's correct for your UNIX host */
-
- "send /usr/lib/sendmail -t < grnrsm.mail"lf
- getln
- "send rm grnrsm.mail"lf
- getln
-
- /* Log this dshrexx out - we don't need it hanging around wasting space */
-
- "send logout"lf
-
- /* Good night, Gracie */
-
- address command
- 'delete t:grnrsm.mail QUIET'
- exit
-
-